package com.flyco.modules.oms.vo;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.flyco.common.aspect.annotation.Dict;
import com.flyco.modules.oms.entity.OmsOrder;
import com.flyco.modules.oms.entity.OmsOrderInvoice;
import com.flyco.modules.oms.entity.OmsOrderItem;
import com.flyco.poi.excel.annotation.Excel;
import com.flyco.poi.excel.annotation.ExcelCollection;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Description: 订单管理
 * @Author: flyco
 * @Date:   2019-12-10
 * @Version: V1.0
 */
@Data
public class OmsOrderItemPage {

	public void setByOreder(OmsOrder oreder) {
		this.setOrderId(oreder.getId());
		this.setCreateTime(oreder.getCreateTime());
		this.setMemberUsername(oreder.getMemberUsername());
		this.setTotalAmount(oreder.getTotalAmount());
		this.setPayAmount(oreder.getPayAmount());
		this.setEffectiveAmount(oreder.getEffectiveAmount());
		this.setFreightAmount(oreder.getFreightAmount());
		this.setPromotionAmount(oreder.getPromotionAmount());
		this.setIntegrationAmount(oreder.getIntegrationAmount());
		this.setCouponAmount(oreder.getCouponAmount());
		this.setDiscountAmount(oreder.getDiscountAmount());
		this.setRedbagAmount(oreder.getRedbagAmount());
		this.setPayType(oreder.getPayType());
		this.setSourceType(oreder.getSourceType());
		this.setSourceSystem(oreder.getSourceSystem());
		this.setSourceScreen(oreder.getSourceScreen());
		this.setStatus(oreder.getStatus());
		this.setProductStatus(oreder.getProductStatus());
		this.setPayStatus(oreder.getPayStatus());
		this.setReturnStatus(oreder.getReturnStatus());
		this.setOrderType(oreder.getOrderType());
		this.setSendType(oreder.getSendType());
		this.setReturnType(oreder.getReturnType());
		this.setDeliveryCompany(oreder.getDeliveryCompany());
		this.setDeliverySn(oreder.getDeliverySn());
		this.setReceiverName(oreder.getReceiverName());
		this.setPaymentTime(oreder.getPaymentTime());
		this.setDeliveryTime(oreder.getDeliveryTime());
		this.setProcessStatus(oreder.getProcessStatus());
		this.setProcessRemindTime(oreder.getProcessRemindTime());
		this.setProcessTag(oreder.getProcessTag());
		this.setStoreId(oreder.getStoreId());
		this.setSalesId(oreder.getSalesId());
		this.setSalesName(oreder.getSalesName());
		this.setStoreId_dictText(oreder.getStoreId_dictText());
	}


	public void setByOrderItem(OmsOrderItem orderItem) {
		this.setId(orderItem.getId());
		this.setProductId(orderItem.getProductId());
		this.setProductPic(orderItem.getProductPic());
		this.setProductSn(orderItem.getProductSn());
		this.setProductName(orderItem.getProductName());
		this.setProductBrand(orderItem.getProductBrand());
		this.setProductPrice(orderItem.getProductPrice());
		this.setProductQuantity(orderItem.getProductQuantity());
		this.setProductSkuId(orderItem.getProductSkuId());
		this.setProductSkuCode(orderItem.getProductSkuCode());
		this.setProductCategoryId(orderItem.getProductCategoryId());
		this.setRealAmount(orderItem.getRealAmount());
		this.setTotalPromotionAmount(orderItem.getTotalPromotionAmount());
		this.setTotalCouponAmount(orderItem.getTotalCouponAmount());
		this.setTotalIntegrationAmount(orderItem.getTotalIntegrationAmount());
		this.setTotalRedbagAmount(orderItem.getTotalRedbagAmount());
		this.setTotalRealAmount(orderItem.getTotalRealAmount());
		this.setReturnApplyQuantity(orderItem.getReturnApplyQuantity());
		this.setReturnRealQuantity(orderItem.getReturnRealQuantity());
		this.setOrderProductType(orderItem.getOrderProductType());
	}

	/**订单id*/
    @Excel(name = "订单编号", width = 20)
	private String orderId;
	/**提交时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date createTime;
	/**用户帐号*/
	private String memberUsername;
	/**订单总金额*/
	private java.math.BigDecimal totalAmount;
	/**应付金额（实际支付金额）*/
    @Excel(name = "实际支付金额", width = 15)
	private java.math.BigDecimal payAmount;
	/**有效金额（实付金额-退款金额）*/
	private java.math.BigDecimal effectiveAmount;
	/**运费金额*/
    @Excel(name = "运费", width = 15)
	private java.math.BigDecimal freightAmount;
	/**促销优化金额（促销价、满减、阶梯价）*/
    @Excel(name = "促销金额", width = 15)
	private java.math.BigDecimal promotionAmount;
	/**积分抵扣金额*/
	private java.math.BigDecimal integrationAmount;
	/**优惠券抵扣金额*/
	private java.math.BigDecimal couponAmount;
	/**管理员后台调整订单使用的折扣金额*/
	private java.math.BigDecimal discountAmount;
	/**红包抵扣金额*/
	private java.math.BigDecimal redbagAmount;
	/**支付方式：ali->支付宝；wx->微信；union->银联*/
    @Excel(name = "支付方式", width = 15)
	@Dict(dicCode = "order_pay_type")
	private String payType;
	/**订单来源：pc->PC订单；app->app订单*/
	private String sourceType;
	/**下单的系统；smart智能终端,baisheng百胜os,shop门店, online新商城,admin后台下单，third三方平台*/
	@Dict(dicCode = "order_source_system")
	private String sourceSystem;
	/**下单时终端类型：pc/wap/ios/android/miniprogram*/
	private String sourceScreen;
	/**订单状态：0->待付款；1->待发货；2->已发货；3->已收货；4->已取消；*/
	@Dict(dicCode = "order_status")
	private Integer status;
	/**货品状态(0：不发货；1：锁定（默认）；2：等待下发；3：已下发；4：已发货；5：已签收；6：直接退货中；7：直接退货入库)*/
	@Dict(dicCode = "order_product_status")
	private Integer productStatus;
	/**支付状态；0：不支付；1：支付锁定；2：等待下发（默认）；3：已下发；4：已支付；(未支付：1、2、3，等待支付：2、3)*/
    @Excel(name = "支付状态", width = 15)
	@Dict(dicCode = "order_pay_status")
	private Integer payStatus;
	/**0:默认，1：部分退货，2：全部退货*/
	@Dict(dicCode = "order_return_status")
	private Integer returnStatus;
	/**订单类型：0->正常订单；1->秒杀订单*/
	private Integer orderType;
	/**发货方式；1：不发货（虚拟单），2：快递，3：物流，4：客户自提*/
	private Integer sendType;
	/**售后类型：0：正常，1：退货，2换货，3退换货*/
	@Dict(dicCode = "order_return_type")
	private Integer returnType;
	/**物流公司(配送方式)*/
	private String deliveryCompany;
	/**物流单号*/
	private String deliverySn;
	/**收货人姓名*/
    @Excel(name = "收货人姓名", width = 15)
	private String receiverName;
	/**支付时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date paymentTime;
	/**发货时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date deliveryTime;
	/**客服跟进状态：0/null：默认,1：跟进中，2：处理结束*/
	private Integer processStatus;
	/**客服跟进提醒时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date processRemindTime;
	/**客服跟进标签*/
	private String processTag;
	/**门店编号*/
	private Long storeId;
	/**导购ID*/
	private Long salesId;
	/**导购名称*/
	private String salesName;
	/**门店名称*/
	private String storeId_dictText;


	/**id*/
	private Long id;
	/**商品id*/
	private Long productId;
	/**商品图片*/
	private String productPic;
	/**商品货号*/
	@Excel(name = "商品货号", width = 15)
	private String productSn;
	/**商品名称*/
	@Excel(name = "商品名称", width = 15)
	private String productName;
	/**商品品牌*/
	@Excel(name = "商品品牌", width = 15)
	private String productBrand;
	/**销售价格*/
	@Excel(name = "销售价格", width = 15)
	private java.math.BigDecimal productPrice;
	/**购买数量*/
	@Excel(name = "购买数量", width = 15)
	private Integer productQuantity;
	/**商品sku编号*/
	private Long productSkuId;
	/**商品sku条码*/
	private String productSkuCode;
	/**商品分类id*/
	private Long productCategoryId;
	/**该商品经过优惠后的分解金额*/
	private java.math.BigDecimal realAmount;
	/**商品促销金额*/
	private java.math.BigDecimal totalPromotionAmount;
	/**优惠券优惠金额*/
	private java.math.BigDecimal totalCouponAmount;
	/**积分优惠金额*/
	private java.math.BigDecimal totalIntegrationAmount;
	/**红包优惠金额*/
	private java.math.BigDecimal totalRedbagAmount;
	/**小计金额(单价*数量-促销-优惠券-积分-红包)*/
	private java.math.BigDecimal totalRealAmount;
	/**申请退货数量*/
	private Integer returnApplyQuantity;
	/**实际退货数量*/
	private Integer returnRealQuantity;
	/**订单商品类型，0：普通商品，1：赠品*/
	@Excel(name = "商品类型", width = 15)
	private String orderProductType;
	
}
